package com.mvity.framework.system.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.mvity.framework.common.base.BaseEntity;
import com.mvity.framework.common.global.IParent;

/**
 * 系统组件表
 * 
 * @author vity
 * @date 2012-5-10
 * @mail vity.1215@gmail.com
 */
@Entity
@Table(name = "system_component")
public class SystemComponent extends BaseEntity implements IParent {

	private static final long serialVersionUID = 452478047005026870L;

	/**
	 * 组件名称
	 */
	@Column(name = "component_title", length = 100, nullable = false)
	private String componentTitle;

	/**
	 * 组件提示信息
	 */
	@Column(name = "component_text", length = 300)
	private String componentText;

	/**
	 * 组件类型
	 */
	@Column(name = "component_type", length = 20, nullable = false)
	private String componentType;

	/**
	 * 组件地址
	 */
	@Column(name = "component_url", length = 1000)
	private String componentUrl;

	/**
	 * 组件图标
	 */
	@Column(name = "component_icon", length = 1000)
	private String componentIcon;

	/**
	 * 组件许可码
	 */
	@Column(name = "component_permissions_code", length = 200)
	private String componentPermissionsCode;

	/**
	 * 父级组件ID
	 */
	@Column(name = "parent_id", length = 32)
	private String parentId;

	/**
	 * @return the componentPermissionsCode
	 */
	public String getComponentPermissionsCode() {
		return componentPermissionsCode;
	}

	/**
	 * @param componentPermissionsCode
	 *            the componentPermissionsCode to set
	 */
	public void setComponentPermissionsCode(String componentPermissionsCode) {
		this.componentPermissionsCode = componentPermissionsCode;
	}

	/**
	 * @return the componentText
	 */
	public String getComponentText() {
		return componentText;
	}

	/**
	 * @param componentText
	 *            the componentText to set
	 */
	public void setComponentText(String componentText) {
		this.componentText = componentText;
	}

	/**
	 * @return the componentTitle
	 */
	public String getComponentTitle() {
		return componentTitle;
	}

	/**
	 * @param componentTitle
	 *            the componentTitle to set
	 */
	public void setComponentTitle(String componentTitle) {
		this.componentTitle = componentTitle;
	}

	/**
	 * @return the componentType
	 */
	public String getComponentType() {
		return componentType;
	}

	/**
	 * @param componentType
	 *            the componentType to set
	 */
	public void setComponentType(String componentType) {
		this.componentType = componentType;
	}

	/**
	 * @return the componentUrl
	 */
	public String getComponentUrl() {
		return componentUrl;
	}

	/**
	 * @param componentUrl
	 *            the componentUrl to set
	 */
	public void setComponentUrl(String componentUrl) {
		this.componentUrl = componentUrl;
	}

	/**
	 * @return the componentIcon
	 */
	public String getComponentIcon() {
		return componentIcon;
	}

	/**
	 * @param componentIcon
	 *            the componentIcon to set
	 */
	public void setComponentIcon(String componentIcon) {
		this.componentIcon = componentIcon;
	}

	/**
	 * @return the parentId
	 */
	@Override
	public String getParentId() {
		return parentId;
	}

	/**
	 * @param parentId
	 *            the parentId to set
	 */
	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.mvity.framework.common.base.IParent#getEntityType()
	 */
	@Override
	public String getEntityType() {
		return "COMPONMENT";
	}

}
